package com.mj.dao;

import com.mj.entity.Book;
import com.mj.mapper.BookMapper;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
@Data
public class BookDao implements BookMapper{
    @Autowired
    private BookMapper bookdao;

    public Book queryById(int id) {
        return bookdao.queryById(id);
    }

    public int insert(Book book) {
        return bookdao.insert(book);
    }

    public List<Map<String, Object>> queryAll() {
        return bookdao.queryAll();
    }
}
